﻿@using Microsoft.Web.Helpers
@model SimpleScrum.Models.RegisterModel
@{
    ViewBag.Title = "Registration";
    List<string> GenderList = new List<string>();
    GenderList.Add("Male");
    GenderList.Add("Female");
    GenderList.Add("Other");
    var showRecaptcha = true;
    if (IsPost) {
        if (ReCaptcha.Validate()) {
            @:Your response passed!
            showRecaptcha = false;}
        else{
            @:Your response didn't pass!
        }
    } 
}
<div class="row-fluid ">
    <div class="span10 offset1">
        <hgroup class="title">
            <h2>@ViewBag.Title</h2>
        </hgroup>
    </div>
    <div class="span10 offset1">
        <div class="span6 thumbnail">
            <div class="modal-header">
                <div class="welcome-massage">
                    Welcome<br/>to get started <br/> Simple Scrum!
                </div>
            </div>
            <div class="modal-header">
                <fieldset class="border ">
                    <legend class="text-info">Already Member?</legend>
                    <div class="thumbnail bg-color-violet"><br/>&nbsp;&nbsp;&nbsp;
                        <span class="btn btn-default unlink">@Html.ActionLink("Login", "Login")</span>&nbsp;&nbsp;
                        <span>if you registered OR already have an account.</span>
                        <br/><br/>
                    </div>
                </fieldset>
            </div>
            <div class="welcome-massage">
                <span class="bg-color-theme">&nbsp;S&nbsp;</span> i m p l e &nbsp;<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;<span class="bg-color-theme">&nbsp;T&nbsp;</span> o o l<br/>
                f o r <span class="bg-color-theme">&nbsp;A&nbsp;</span><br/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s o f t w a <span class="bg-color-theme">&nbsp;R&nbsp;</span> e<br/>
                d e v e l o p m e n <span class="bg-color-theme">&nbsp;T&nbsp;</span>
            </div>
        </div>
        <h3 class="message pull-right popover-title">Create A New Account</h3>
        <div class="span6 thumbnail">
            <div class="span12 border">
                <section id="registrationForm" class="popover-title">
                    <fieldset>
                        <legend>Registration Form</legend>
                        @using (Html.BeginForm())
                        {
                            @Html.AntiForgeryToken()
                            <div class="text-error">@Html.ValidationSummary()</div>
                            <div class="span11">
                                <div class="span6 control-group">
                                    <span class="control-label">@Html.LabelFor(m => m.FirstName)</span>
                                    <div class="controls">
                                        @Html.EditorFor(m => m.FirstName)
                                        <div class="text-warning">@Html.ValidationMessageFor(m => m.FirstName)</div>
                                    </div>
                                </div>
                                <div class="span6 control-group">
                                    <span class="control-label">@Html.LabelFor(m => m.LastName)</span>
                                    <div class="controls">
                                        @Html.EditorFor(m => m.LastName)
                                        <div class="text-warning">@Html.ValidationMessageFor(m => m.LastName)</div>
                                    </div>
                                </div>
                            </div>
                            <div class="span11">
                                <div class="span6 control-group">
                                    <span class="control-label">@Html.LabelFor(m => m.Email)</span>
                                    <div class="controls">
                                        @Html.EditorFor(m => m.Email)
                                        <div class="text-warning">@Html.ValidationMessageFor(m => m.Email)</div>
                                    </div>
                                </div>
                                <div class="span6 control-group">
                                    <span class="control-label" >@Html.LabelFor(m => m.Gender)</span>
                                    <div class="controls">
                                        @Html.DropDownListFor(m => m.Gender, new MultiSelectList(GenderList))
                                        <div class="text-warning">@Html.ValidationMessageFor(m => m.Gender)</div>
                                    </div>
                                </div>
                            </div>
                            <div class="span11">
                                <div class="span6 control-group">
                                    <span class="control-label" >@Html.LabelFor(m => m.Password)</span>
                                    <div class="controls">
                                        @Html.PasswordFor(m => m.Password)
                                        <div class="text-warning">@Html.ValidationMessageFor(m => m.Password)</div>
                                    </div>
                                </div>
                                <div class="span6 control-group">
                                    <span class="control-label" >@Html.LabelFor(m => m.ConfirmPassword)</span>
                                    <div class="controls">
                                        @Html.PasswordFor(m => m.ConfirmPassword)
                                        <div class="text-warning">@Html.ValidationMessageFor(m => m.ConfirmPassword)</div>
                                    </div>
                                </div>
                                <div class="span6 control-group">
                                    @if (showRecaptcha == true)
                                    {
                                        if (ReCaptcha.PrivateKey != "")
                                        {
                                            <br/>
                                            <div class="control-label name">
                                                @ReCaptcha.GetHtml(theme:"green")
                                            </div>
                                            <br/>
                                            <div class="controls">
                                                <input type="submit" value="Register" class="btn btn-success" />
                                            </div>
                                        }
                                    }
                                </div>
                            </div>
                        }
                    </fieldset>
                </section>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
